package com.tuniu.agents.common.vo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * Pagination result wrapper class
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PageResult<T> {
    /**
     * Current page data
     */
    private List<T> content;
    /**
     * Total number of records
     */
    private long totalElements;
    /**
     * Total number of pages
     */
    private int totalPages;
    /**
     * Current page number
     */
    private int pageNumber;
    /**
     * Size of each page
     */
    private int pageSize;
    /**
     * Is this the first page
     */
    private boolean first;
    /**
     * Is this the last page
     */
    private boolean last;
}